{% extends 'base.html' %}
{% load mytags %}
{% block css %}
    <link href="/site_media/css/pic.css" rel="stylesheet" type="text/css">
{% endblock %}
{% block content %}
<p class="alert alert-info">照片. {% if user.is_active %}<span style="float: right"><a class="label label-warning" href="/manage/pic/create_type/">添加照片</a></span>{% endif %}</p>
{% for obj in pics %}
  <div class="col-sm-6 col-md-4">
    <div class="thumbnail">
      <a href="/pic/{{ obj.id }}/" class="thumbnail"><img src="{{ obj.getPic.img }}" alt="{{ obj.title }}" width="200px" height="200px"></a>
      <div class="caption">
        <h4>{{ obj.title }}</h4>
        <p class="text-muted">{{ obj.desc }}</p>
        <div class="text-muted">发布于：{{ obj.add_time|fun }}&nbsp;&nbsp;共{{ obj.getPicCount }}张图片</div>
        {% if user.is_active %}<p class="text-right"><a href="javascript:;" class="pic_type_del" type="{{ obj.id }}"><span class="glyphicon glyphicon-remove"></span></a>&nbsp;&nbsp;<a href="/manage/pic/create_type/?id={{ obj.id }}" class="picdel"><span class="glyphicon glyphicon-edit"></span></a></p>{% endif %}
      </div>
    </div>
  </div>
{% endfor %}
{% endblock %}
